-- GENERATED SPELL FOR [Ghaz'an] --


function spell0_18105(pUnit, Event) --@Acid Breath,n/a--
pUnit:FullCastSpellOnTarget(34268,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18105', 20000, 1)
end

function spell1_18105(pUnit, Event) --@Acid Spit,n/a--
pUnit:FullCastSpellOnTarget(34290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18105', 836, 1)
end

function spell2_18105(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(15716,pUnit)
pUnit:RegisterEvent('Sorts_18105', 828, 1)
end

function spell3_18105(pUnit, Event) --@Tail Sweep,n/a--
pUnit:FullCastSpellOnTarget(34267,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18105', 759, 1)
end

function spell4_18105(pUnit, Event) --@Tail Sweep,n/a--
pUnit:FullCastSpellOnTarget(38737,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18105', 798, 1)
end

function Sorts_18105(pUnit, Event)
local choix_sorts_18105 = math.random(0, 4)
if choix_sorts_18105 == 0 then
pUnit:RegisterEvent('spell0_18105', 1, 1)
end
if choix_sorts_18105 == 1 then
pUnit:RegisterEvent('spell1_18105', 1, 1)
end
if choix_sorts_18105 == 2 then
pUnit:RegisterEvent('spell2_18105', 1, 1)
end
if choix_sorts_18105 == 3 then
pUnit:RegisterEvent('spell3_18105', 1, 1)
end
if choix_sorts_18105 == 4 then
pUnit:RegisterEvent('spell4_18105', 1, 1)
end
end

function mob18105_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18105', math.random(1500, 3000), 1)
end

function mob18105_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18105_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18105_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18105, 1, 'mob18105_Action')
RegisterUnitEvent(18105, 2, 'mob18105_Leave')
RegisterUnitEvent(18105, 3, 'mob18105_Kill')
RegisterUnitEvent(18105, 4, 'mob18105_Die')
